package org.csmzxy.class2334;

public class shuixianhuashu {
    public static boolean isshuixianhuashu(int num){
        if (num < 100 || num > 999) {
            return false;
        }
        int a=num / 100;
        int b = (num / 10) %10;
        int c = num % 10;
        return a * a * a + b * b * b + c * c * c == num;
    }
    public static void main(String[ ] args){
    int number = 153;
    boolean result =isshuixianhuashu(number);
        System.out.println(number + "是否为水仙花数：" + result);
    }
}
